home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / powerb5.zip / P5UTL001.TIP < prev    next >
Text File  |  1993-06-01  |  2KB  |  49 lines

  1. I was tinkering with ANSI.SYS's special escape sequences and
  2. found myself wishing for an easier way to invoke them from a
  3. batch file. After all, ANSI.SYS can do a lot of neat tricks.
  4. For instance, the character sequences Esc[44m and Esc[37m,
  5. where Esc is the escape character (ASCII 27), will change
  6. the colors on the DOS command screen, making the background
  7. blue and the characters white. You can create some
  8. attractive color menus this way.
  9.  
  10. Unfortunately, special measures are usually required to get
  11. the Esc character into a batch file. To solve this problem,
  12. I wrote a small utility that makes ANSI.SYS functions
  13. available from the DOS command line.
  14.  
  15. Richard C. Jones
  16. Throop, Pennsylvania
  17.  
  18. Editor's Note: ESC.COM can be found in the P5UTL directory
  19. on your PowerBase *.* Volume 5 diskette. To use it, copy it
  20. to a directory listed in your PATH command and be sure the
  21. command `DEVICE = C:/DOS/ANSI.SYS' is in your CONFIG.SYS
  22. file. the following table shows a small sampling of things
  23. you can do with this program.
  24.  
  25. Sample escape sequences using ESC.BAT
  26.  
  27. Put this in batch...  To do this
  28. ------------ -------  ----------
  29. ESC 44;37m            Make background blue, foreground white
  30. ESC 12;40H            Move cursor to row 12, column 40
  31. ESC s                 Save the cursor position
  32. ESC u                 Restore the saved cursor position
  33. ESC K                 Erase to end of current line
  34. ESC 5B                Move the cursor down 5 lines
  35. ESC 0;68;"DIR";13p    Make the F10 key execute the DIR
  36.                       command at the DOS prompt
  37.  
  38. ESC 63;92p            These two commands, in succession,
  39. ESC 92;63p            swap the backslash and question
  40.                       mark keys
  41.  
  42.  
  43. Title: Escape From DOS
  44. Category: UTL
  45. Issue Date: February, 1992
  46. Editor: Brett Glass
  47. Supplementary Files: P5UTL\ESC.COM
  48. Filename: P5UTL001.TIP
  49.